package ch.zbw.timeline.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;

/**
 * Domain class for years of service bonus
 */
@Entity
@SequenceGenerator(name = "id_bonus_years_of_service", initialValue = 1, allocationSize = 1)
@Table(name = "bonus_years_of_service")
@Data
public class BonusYearsOfService implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_bonus_years_of_service", nullable = false)
	private int id;

	@Column(name = "number_of_years", nullable = true)
	private Integer numberOfYears;

	@Column(name = "number_of_weeks", nullable = true)
	private Integer numberOfWeek;

	public BonusYearsOfService() {
	}

	public BonusYearsOfService(Integer numberOfYears, Integer numberOfWeek) {
		this.numberOfYears = numberOfYears;
		this.numberOfWeek = numberOfWeek;
	}

}
